package game.entity;

import game.helper.IAbility;

public class Weapon extends AbsSprite{

	//IAbility ability;
	public Weapon(Weapon weapon){
		super(weapon);
	}
	public Weapon(int id , SpriteManager _SpriteManager, String imgPath, int idAnimation, float frameDuration, int num_rows, int num_clus) {
		super(id, _SpriteManager, imgPath,idAnimation,  frameDuration,  num_rows, num_clus);
	}
	
	public Weapon(int id , SpriteManager _SpriteManager, String imgPath,int idAnimation, float frameDuration, int scrX, int scrY, int frameWidth, int frameHeight, int num_rows, int num_clus) {
		super(id, _SpriteManager, imgPath,idAnimation,  frameDuration,  scrX, scrY, frameWidth, frameHeight, num_rows, num_clus);
	}	
	
	public Weapon(int id , SpriteManager _SpriteManager, String configueFilePath)
	{
		super(id, _SpriteManager, configueFilePath);
	}
	

	public Weapon(AbsSprite weapon)
	{
		super(weapon);
	}
	
	@Override
	public void update() {
		if(iAbility != null)
			iAbility.action(this);
		super.update();
	}
	
	public void setAbility(IAbility _ability)
	{
		this.iAbility  = _ability; 
	}
	
	public void attack(AbsSprite sprite)
	{
		this.iAbility.action(sprite);
	}
}
